<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>新闻内容列表</title>
<%@include file="../../common/tagInclude.jsp" %>
<%@include file="../../common/headerInclude.jsp" %>
<script type="text/javascript">
	$(function() {
		$("#jvForm").validate();
	});
	function edit(websiteId){
		window.location = '${basePath}super/website/website-show.do?websiteId='+websiteId;
	}
	function synchWebsite(){
		if(!confirm('确认要同步分站信息!确定后,会将分站所有信息同步至各个分站点,并且覆盖原有数据!')){
			return;
		}
		window.location = '${basePath}synch/websiteInfo/websiteInfoSend.do';
	}
</script>
<script type="text/javascript" src="${basePath}res/common/js/My97DatePicker/WdatePicker.js"></script>
</head>
<body>
<div class="body-box">
	<div class="rhead">
		<div class="rpos">当前位置: 首页  - 站外消息 - 分站列表[<font color="red">★</font>标识自身]</div>
		<div class="clear"></div>
	</div>
	<form action="${basePath}super/website/website-list.do" method="get" style="padding-top:5px;">
		<div>
			&nbsp;&nbsp;<input type="button" value="分站信息同步" onclick="javascript:synchWebsite();">
		</div>
		<table class="pn-ltable" width="100%" cellspacing="1" cellpadding="0" border="0">
			<thead class="pn-lthead">
			<tr>
				<th width="20%">名称</th>
				<th>描述</th>
				<th width="20%">URL前缀</th>
				<th width="10%">密钥</th>
				<th width="10%">操作</th>
			</tr>
			</thead>
			<tbody class="pn-ltbody">
			<c:forEach items="${websiteList}" var="website" varStatus="status">
				<tr>
					<td align=center>${website.name}&nbsp;<c:if test="${website.isSelf==1 }"><font color="red">★</font></c:if></td>
					<td align=center>${website.desc}</td>
					<td>${website.url }</td>
					<td>${website.sign }</td>
					<td align=center><a href="javascript:edit('${website.id}');">编辑</a></td>
				</tr>
			</c:forEach>
			</tbody>
		</table>
		<c:set var="pageURL" value="${basePath}super/news/news-list.do?languageId=${query.languageId}&cateId=${query.cateId}&isShowIndex=${query.isShowIndex}&isShowList=${query.isShowList}&kw=${fmtString:encoder(query.kw)}&startTime=${fmtString:encoder(query.startTime)}&endTime=${fmtString:encoder(query.endTime)}&"/>
		<%@include file="../../common/pages.jsp"%>
	</form>
</div>
</body>
</html>